package com.tensquare.base.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * ------------------------------
 * 功能：配置redisson
 * 作者：WF
 * 微信：hbxfwf13590332912
 * 创建时间：2021/9/10-15:05
 * ------------------------------
 */
@Configuration
public class RedissClientConfig {
    @Bean
    public RedissonClient redisson(){
        Config config = new Config();
        config.useSingleServer()
                .setTimeout(1000000)
                .setAddress("redis://192.168.56.10:6379");
        return Redisson.create(config);
    }
}
